<route lang="json5">
{
  style: {
    navigationStyle: 'default',
    navigationBarTitleText: '设置',
  },
}
</route>
<template>
  <view mt ml mr>
    <uv-button v-if="useAuth.getToken()" type="warning" @click="doLogout">退出登录</uv-button>
  </view>
</template>

<script setup lang="ts">
import { useAuthStore } from '@/store/auth'
import { goBack } from '@/utils/route'

const useAuth = useAuthStore()
const doLogout = () => {
  useAuth.delToken()
  goBack(getCurrentPages())
}
</script>

<style scoped lang="scss"></style>
